package com.ssyx.activity.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ssyx.model.activity.ActivityInfo;
import com.ssyx.model.activity.ActivityRule;
import com.ssyx.model.activity.ActivitySku;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author 34901
* @description 针对表【activity_info(活动表)】的数据库操作Mapper
* @createDate 2024-05-05 21:12:36
* @Entity com.ssyx.activity.pojo.ActivityInfo
*/
@Repository
public interface ActivityInfoMapper extends BaseMapper<ActivityInfo> {

    //3.根据商品skuId的集合,查询activity_sku表 和 activity_info表,查出已经参加了活动,且活动没有过期的商品skuId的集合
    List<Long> selectExistSkuIdList(@Param("skuIdList")List<Long> skuIdList);

    //获取skuId列表对应的全部促销规则(activity_sku,activity_info)
    List<ActivitySku> selectCartActivityList(@Param("skuIdList")List<Long> skuIdList);
}




